<template>
	<view class="ListItem" @tap="clickItem">
		<view class="cell">
			<view class="cell_title">
				<text>{{ title }}</text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'ListItem',
	props: {
		title: {
			type: String,
			default: ''
		}
	},
	data() {
		return {};
	},
	methods: {
		clickItem() {
			this.$emit('click');
		}
	}
};
</script>

<style lang="scss">
.ListItem {
	.cell {
		position: relative;
		display: flex;
		box-sizing: border-box;
		width: 100%;
		padding: 20rpx 0rpx;
		overflow: hidden;
		color: #323233;
		font-size: 28rpx;
		line-height: 48rpx;
		background: #fff;
	}

	.cell:after {
		position: absolute;
		box-sizing: border-box;
		content: ' ';
		pointer-events: none;
		right: 0rpx;
		bottom: 0;
		left: 0rpx;
		border-bottom: 1px solid #ebedf0;
		transform: scaleY(0.5);
	}

	.cell_title {
		flex: 1;
	}
}
</style>
